package com.weipai.springboot.module.service;

import com.weipai.springboot.model.Exchange;
import com.weipai.springboot.model.Order;
import com.weipai.springboot.model.SaleReturn;
import com.weipai.springboot.model.api.OrderRequest;
import com.weipai.springboot.model.api.Response;

import java.text.ParseException;

public interface OrderService {

    Response getOrderList(String shopId, String customerId, Integer status, String orderNumber, String startTime,
                          String endTime, String hasSubList, Integer page, Integer size, String keyword,Integer modeOfPayment, String draw);

    Response update(Order order);

    Response getOrderDetail(String orderNumber);

    Response deleteOrder(String orderNumber);

    Response getOrderCountList(String time);

    Response save(OrderRequest request);

    //退货申请
    Response returnApplication(SaleReturn saleReturn, String imgUrl);

    //跳转换货详情页面
    Response exchangeGoodsInfo(String orderNumber, String goodsId);

    //审核退货订单
    Response auditReturnOrder(String saleReturnNumber, Integer isAudit);

    //退货订单的确认收货
    Response receivingReturnOrder(String saleReturnNumber);

    //换货申请
    Response exchangeApplication(Exchange exchange);

    //换货申请的审核
    Response auditExchange(String exchangeNumber, Integer isAudit);

    //更改换货订单的状态
    Response changeExchangeStatus(Exchange exchange);

    //获得用户全部的子订单
    Response orderSublistByCustomerId(Integer page, Integer size, Integer isAfterSale);

    //点击售后申请跳转选择售后类型页面
    Response afterSaleTypeInfo(String orderSublistId);

    //确认发货
    Response confirmDelivery(String orderNumber, String logisticsCompany, String trackingNumber);

    // 退换/售后列表 -  申请记录 -   查看详情
    Response geGoodsInfo(String orderNumber, String goodsId, String saleReturnId, String exchangeId);

    //退换/售后列表 - 申请记录 - 查看详情 - 填写 运单号
    Response inserExpressInfo(String expressNumber,String expressCompany, String saleReturnId, String exchangeId);

    //后端查询所有的退换货
    Response getSaleReturnList(Integer isAudit, Integer type, Integer page, Integer size, String draw, String search,
                               String shopId, String startTime, String endTime);



    //定时任务--更改订单为交易成功

    void disposeOrder() throws Exception;

    //定时任务--修改用户可提现金额
    void disposeMoney() throws Exception;





    //处理未支付的订单
    void disposeUnpaidOrder();


    Response saleReturnAudit(Integer isAudit, Integer saleReturnStatus, Integer page, Integer size, String draw, String search,
                             String shopId, String startTime, String endTime);

    Response exchangeReturnOrder(String exchangeId);

    Response receivingReturnOrderAudit(String saleReturnNumber);

    //订单生产中
    Response orderGenerate(String orderNumber);

    //处理未支付的需求订单
    void disposeUnpaidDemand();

    Response addNotesByOrderId(String orderId,String notes);

    Response getStatus(String orderNumber, String goodsId);

    Response orderSublistByCustomerIdForWeb(Integer page, Integer size, Integer isAfterSale, String keyword);
}
